﻿package com.neriksworkshop.lib.colourLovers.events 
{
	import flash.events.Event;
	import com.neriksworkshop.lib.colourLovers.requests.IRequest;
	
	/**
	 * ...
	 * @author Erik
	 */
	public class RequestEvent extends Event 
	{
		
		public static const RESULTS:String = "ready";
		public static const NO_RESULTS:String = "noresults";
		
		private var _uId:int; 
		private var _request:IRequest;
		
		public function RequestEvent(_uId:int, _request:IRequest, type:String, bubbles:Boolean=false, cancelable:Boolean=false) 
		{ 
			this._uId = _uId;
			this._request = _request;
			super(type, bubbles, cancelable);
			
		} 
		
		public override function clone():Event 
		{ 
			return new RequestEvent(_uId, _request, type, bubbles, cancelable);
		} 
		
		public override function toString():String 
		{ 
			return formatToString("RequestEvent", "type", "bubbles", "cancelable", "eventPhase"); 
		}
		
		public function get uId():int { return _uId; }
		
		public function get request():IRequest { return _request; }

		
	}
	
}